package com.first.xiinn.dao.impl;

import java.util.List;

import com.first.core.dao.BaseDao;
import com.first.core.util.AppUtil;
import com.first.core.dao.impl.BaseDaoImpl;
import com.first.xiinn.dao.CommentDao;
import com.first.xiinn.model.Comment;


public class CommentDaoImpl extends BaseDaoImpl<Comment> implements CommentDao{
	
	public CommentDaoImpl() {
		super(Comment.class);
	}
	
	@Override
	public List<Comment> getNewestComments() {
		return sqlMapClientTemplate.queryForList("getNewestComments");
	}
	/*
	 * (non-Javadoc)
	 * @see com.first.xiinn.dao.CommentDao#addComment(com.first.xiinn.model.Comment)
	 */
	@Override
	public Comment addComment(Comment comment) {
		return (Comment) sqlMapClientTemplate.insert("addComment",comment);
	}
	
	
}